Learn R Programming

bnlearn (version 4.9.1)

foreign files utilities: Read and write BIF, NET, DSC and DOT files

Description

Read networks saved from other programs into bn.fit objects, and dump bn and bn.fit objects into files for other programs to read.

Usage

# Old (non-XML) Bayesian Interchange format.
read.bif(file, debug = FALSE)
write.bif(file, fitted)

# Microsoft Interchange format. read.dsc(file, debug = FALSE) write.dsc(file, fitted)

# HUGIN flat network format. read.net(file, debug = FALSE) write.net(file, fitted)

# Graphviz DOT format. write.dot(file, graph)

Value

read.bif(), read.dsc() and read.net() return an object of class

bn.fit.

write.bif(), write.dsc(), write.net() and write.dot()

return NULL invisibly.

Arguments

file

a connection object or a character string.

fitted

an object of class bn.fit.

graph

an object of class bn or bn.fit.

debug

a boolean value. If TRUE a lot of debugging output is printed; otherwise the function is completely silent.

Author

Marco Scutari

References

Bayesian Network Repository, https://www.bnlearn.com/bnrepository/.